<?php
/**
* @version 1.0.0
* @package RSSearch! 1.0.0
* @copyright (C) 2011 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/

defined('_JEXEC') or die('Restricted access');

jimport('joomla.application.component.controller');
class RSsearchController extends JController
{
	function display()
	{
		parent::display();
	}
	function cutText($text,$nr)
	{
		$text = stripslashes(strip_tags($text));
		$words = explode(' ', $text);
		if(count($words) < $nr ) $nr = count($words);

		$string = '';
		for($i=0; $i<$nr; $i++){
			$string .= $words[$i].' ';
		}
		return $string;
	}
}
?>